﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CategoryEdit.ascx.cs" Inherits="Thuoc24h.AdminCP.Controls.CategoryEdit" %>

<script>
    $(function () {
        $('#<%= txtName.ClientID %>').change(function () {
            var alias = ConvertToUnSign(this.value);
            $('#<%= txtUnsignName.ClientID %>').val(alias);
        });
    });

</script>
<asp:HiddenField ID="hfCategoryId" runat="server" />
<Telerik:RadPanelBar runat="server" ID="RadPanelBar1" Width="100%" Height="100%"
    ExpandMode="FullExpandedItem">
    <Items>
        <Telerik:RadPanelItem Text="Thêm / sửa chuyên mục" Expanded="True">
            <ContentTemplate>
                <div class="item">
                    <label>Loại chuyên mục:</label><Telerik:RadComboBox runat="server" ID="cbbCategoryType" Width="350px" Enabled="False">

                        <Items>
                            <Telerik:RadComboBoxItem runat="server" Text="Sản phẩm" Value="1" />
                            <Telerik:RadComboBoxItem runat="server" Text="Tin tức" Value="2" />
                        </Items>
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </Telerik:RadComboBox>

                </div>

                <div class="item">
                    <div class="fleft" style="font-weight: bold;width: 120px;text-align: right">Chuyên mục cha:</div>

                    <div class="category-tree ">
                        <Telerik:RadTreeView ID="radTreeCategories" OnNodeClick="radTreeCategories_NodeClick"
                            runat="server" Width="377px" Height="250px">
                            <DataBindings>
                                <Telerik:RadTreeNodeBinding Expanded="True" />
                            </DataBindings>
                        </Telerik:RadTreeView>
                    </div>

                </div>

                <div class="item">
                    <label>Tên:</label><Telerik:RadTextBox runat="server" ID="txtName" Width="350px" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" Display="Dynamic" ForeColor="red" ControlToValidate="txtName" runat="server" ErrorMessage="*" />
                </div>
                <div class="item">
                    <label>Tên không dấu:</label><Telerik:RadTextBox runat="server" ID="txtUnsignName" Width="350px" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" Display="Dynamic" ForeColor="red" ControlToValidate="txtUnsignName" runat="server" ErrorMessage="*" />
                </div>
                <div class="item">
                    <label>Thứ tự:</label><Telerik:RadNumericTextBox ID="radNumberOrd" runat="server" MinValue="0" Value="1" Width="218px" CssClass="right" ShowSpinButtons="True">
                        <NumberFormat DecimalDigits="0" />
                    </Telerik:RadNumericTextBox>
                </div>

                <div class="item">
                    <label></label>
                    <Telerik:RadButton runat="server" ID="btnSave" OnClick="btnSave_OnClick"></Telerik:RadButton>
                    <Telerik:RadButton runat="server" Text="Làm lại" OnClick="OnClick" CausesValidation="False"></Telerik:RadButton>
                </div>
            </ContentTemplate>
        </Telerik:RadPanelItem>
    </Items>
</Telerik:RadPanelBar>
